import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {//登录界面
    path:'/',
    name:'login',
    component:()=>import(/*webpackChunkName:'Login'*/ '@/page/login/login.vue')
  },
  {
    path: '/forgotPassword',
    name:'forgotPassword',
    component: () => import(/*webpackChunkName:'ForgotPassword'*/ '@/views/forgotPassword.vue')
  },
  {
    path: '/problem',
    name:'problem',
    component: () => import(/*webpackChunkName:'Problem'*/ '@/views/problem.vue')
  },
  {
    path: '/selfAppeal',
    name:'selfAppeal',
    component: () => import(/*webpackChunkName:'SelfAppeal'*/ '@/views/selfAppeal.vue')
  },
  {
    path: '/freezeAccount',
    name:'freezeAccount',
    component: () => import(/*webpackChunkName:'FreezeAccount'*/ '@/views/freezeAccount.vue')
  },
  {
    path: '/unfreezeAccount',
    name:'unfreezeAccount',
    component: () => import(/*webpackChunkName:'UnfreezeAccount'*/ '@/views/unfreezeAccount.vue')
  },
  {
    path: '/commonQuestions',
    name:'commonQuestions',
    component: () => import(/*webpackChunkName:'CommonQuestions'*/ '@/views/commonQuestions.vue')
  },
  {
    path: '/index',
    name: 'index',
    component: () => import(/*webpackChunkName:'index'*/ '@/page/index/index.vue'),
    redirect: '/keshihua',
    children: [
      {
        path: '/userpage',
        name: 'userpage',
        component: () => import(/*webpackChunkName:'Userpage'*/ '@/page/user-page/user.vue')
      },
      {
        path: '/keshihua',
        name: 'keshihua',
        component: () => import(/*webpackChunkName:'Keshihua'*/ '@/page/keshihua/keshihua.vue')
      },
      {
        path:'/order',
        name:'order',
        component:()=>import(/*webpackChunkName:'Order'*/ '@/page/order/order.vue')
      },
      {
        path: '/data',
        name: 'data',
        component: () => import(/*webpackChunkName:'Data'*/ '@/page/data/data.vue')
      },
      {
        path: '/dishes',
        name: 'dishes',
        component: () => import(/*webpackChunkName:'Dishes'*/ '@/page/dishes/dishes.vue')
      },
      {
        path: '/role',
        name: 'role',
        component: () => import(/*webpackChunkName:'Role'*/ '@/page/role/role.vue')
      },
      {
        path: '/works',
        name: 'Works',
        component: () => import(/*webpackChunkName:'Works'*/ '@/page/data/works.vue')
      },
      
      {
  path: '/huatuo',
  name: 'Huatuo',
  component: () => import(/*webpackChunkName:'Huatuo'*/ '@/huatuo/huatuo.vue')
}
    ]
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router